package com.changanw.dd.service;


import com.changanw.dd.Mapper.SlaveMapper;
import com.changanw.dd.annotation.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SlavService {
    @Autowired
    SlaveMapper slaveMapper;
    @DataSource("slave")
    public void updateUserAge(String username, Integer age) {
        slaveMapper.updateUserAge(username, age);
        int i = 1/0;
    }
}
